package com.biz.primus.ms.order.stream;

import com.biz.primus.model.oms.stream.ReturnStateChannel;
import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * @author yanweijin
 * @date 2017/11/17
 */
public interface ReturnStateSink extends ReturnStateChannel {
    /**
     * 接收新退货单
     *
     * @return
     */
    @Input(RETURN_BEGIN)
    SubscribableChannel returnBeginInput();

    /**
     * 接收退货单验收入库
     *
     * @return
     */
    @Input(RETURN_FINISHED)
    SubscribableChannel returnFinishedInput();

    /**
     * 接收退货单退款完成
     *
     * @return
     */
    @Input(RETURN_REFUND_FINISHED)
    SubscribableChannel returnRefundFinishedInput();

    /**
     * 接收审核通过的退货单
     *
     * @return
     */
    @Output(RETURN_AUDITED_AND_PASS)
    MessageChannel returnAuditedPassInput();

    /**
     * 接收审核拒绝的退货单
     *
     * @return
     */
    @Output(RETURN_AUDITED_AND_REJECT)
    MessageChannel returnAuditedRejectInput();

    /**
     * 接收取消/终止的退货单
     *
     * @return
     */
    @Output(RETURN_CANCEL)
    MessageChannel returnCancelInput();
}
